import request from '@/utils/request.js'
export function login(data){ // 登录
	return request({
	    url: '/loginAdmin/login?Phone='+data.phoneNumber+'&password='+data.password,
		method: 'post'
		// data: JSON.stringify(data)
	 })
}
//注册接口

export function regis(data,code){ 
	
	return request({
		url:'/loginAdmin/register?code='+code + '&phone='+data.phone +'&password='+ data.password +'&password2=' + data.password2,
		method: 'post'
		
	 })
	// console.log(code,data)
}
//注册验证码接口
export function getCode(phone){ 
	return request({
		url:'/loginAdmin/sendVerificationCode?phone='+phone,
		method: 'post'
		
	 })
	// console.log(code,data)
}
//找回密码接口
export function RetrievePwd(data,code){ 
	// console.log(code)
	return request({
		url:'/loginAdmin/retrievePassword?phone='+data.phoneNumber+'&password='+data.password+'&code='+code.toString(),
		method: 'post'
		// data: JSON.stringify(data)
	 })
	// console.log(code,data)
}
//找回密码验证码接口
export function getPwdCode(phone){ 
	return request({
		url:'/loginAdmin/sendLoginVerificationCode?phone='+phone,
		method: 'post'
		
	 })
	// console.log(code,data)
}

//首页轮播图

export function getBanner() { // 登录
    return request({
        url: '/banner/getAll',
        method: 'get'
            // data: JSON.stringify(data)
    })
}
//搜索设计师
export function indexSearch(params) {
    return request({
        url: '/cmsDesigner/indexSearch',
        method: 'get',
        data: params,
		dataType:'text'
    })
}
//获取地址列表
export function getDistrict(params) {
    return request({
        url: '/cmsDesigner/getDistrict',
        method: 'get',
        data: params

    })
}
//获取地址右边的区域
export function getLocationName(data) {
    return request({
        url: '/cmsDesigner/getLocationName',
        method: 'get',
        data: data
    })
}
//等级搜索（中级，高级)
export function gradeSearch(data) {
    return request({
        url: '/cmsDesigner/gradeSearch',
        method: 'get',
        data: data,
		dataType:'text'
    })
}
//获取美发筛选的信息
export function getCategory() {
    return request({
        url: '/cmsDesigner/getCategory',
        method: 'get'
    })
}
//销量最多
export function getSales(data) {
    return request({
        url: '/cmsDesigner/getSales',
        method: 'get',
        data: data,
		dataType:'text'
    })
}
//价格最低
export function getLowestPrice(data) {
    return request({
        url: '/cmsDesigner/getLowestPrice',
        method: 'get',
        data: data,
		dataType:'text'
    })
}
//价格最高
export function getHighestPrice(data) {
    return request({
        url: '/cmsDesigner/getHighestPrice',
        method: 'get',
        data: data,
		dataType:'text'
    })
}
//最新上架
export function getNewest(data) {
    return request({
        url: '/cmsDesigner/getNewest',
        method: 'get',
        data: data,
		dataType:'text'
    })
}
//离我最近
export function getRecent(data) {
    return request({
        url: '/cmsDesigner/getRecent',
        method: 'get',
        data: data,
		dataType:'text'
    })
}
//位置区域
export function getLocationArea(data) {
    return request({
        url: '/cmsDesigner/getLocationArea',
        method: 'get',
        data: data,
		dataType:'text'
    })
}
//好评优先
export function getPraise(data) {
    return request({
        url: '/cmsDesigner/getPraise',
        method: 'get',
        data: data,
		dataType:'text'
    })
}
//根据服务细分查询相应设计师
export function searchSubdivision(data) {
    return request({
        url: '/cmsDesigner/searchSubdivision',
        method: 'get',
        data: data,
		dataType:'text'
    })
}
//搜索设计师的筛选
export function screen(data) {
    return request({
        url: '/cmsDesigner/screen',
        method: 'get',
        data: data,
		dataType:'text'
    })
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//搜索品牌管
export function storeFunction(data) {
    return request({
        url: '/cmsShop/search',
        method: 'get',
        data: data,
        dataType: 'text'
    })
}
//店铺类型搜索
export function searchByShopType(data) {
    return request({
        url: '/cmsShop/searchByShopType',
        method: 'get',
        data: data,
        dataType: 'text'

    })
}
//品牌馆好评优先
export function getPraise1(data) {
    return request({
        url: '/cmsShop/getPraise',
        method: 'get',
        data: data,
        dataType: 'text'
    })
}
//品牌馆销量最多
export function getSales1(data) {
    return request({
        url: '/cmsShop/getSales',
    })
}
// 首页品牌馆展示
export function BrandPavilion(data) {
    return request({
        url: '/cmsShop/getShop',
        method: 'get',
        data: data
    })
}

// 首页设计师展示
export function Designer(data) {
    return request({
        url: '/cmsDesigner/getHomePageDesigner',
        method: 'get',
        data: data,
        dataType: 'text'
    })
}
//品牌馆最新上架
export function getNewest1(data) {
    return request({
        url: '/cmsShop/getNewest',
        method: 'get',
        data: data,
        dataType: 'text'
    })
}
//品牌馆价格最低
export function minPrice(data) {
    return request({
        url: '/cmsShop/getLowestPrice',
        method: 'get',
        data: data,
        dataType: 'text'
    })
}
//品牌馆价格最高
export function maxprice(data) {
    return request({
        url: '/cmsShop/getHighestPrice',
        method: 'get',
        data: data,
        dataType: 'text'
    })
}
//品牌馆根据服务细分查询相应店铺
export function searchShopByClassification(data) {
    return request({
        url: '/cmsShop/searchShopByClassification',
        method: 'get',
        data: data,
        dataType: 'text'
    })
}
//品牌馆位置区域查询店铺
export function searchShopByAddress(data) {
    return request({
        url: '/cmsShop/searchShopByAddress',
        method: 'get',
        data: data,
        dataType: 'text'
    })
}
//品牌馆多个筛选
export function screen1(data) {
    return request({
        url: '/cmsShop/screen',
        method: 'get',
        data: data,
        dataType: 'text'
    })
}
//精品推荐===================================================================================================================================================================
//精品推荐首页点击
export function getFeatured(data) {
    return request({
        url: '/cmsDesigner/getFeatured',
        method: 'get',
        data: data,
        dataType: 'text'
    })
}